<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<link rel="stylesheet" href="__CONTROL_TPL__/css/order.css" />
	<title>后盾网学员项目-仿哇塞网</title>
</head>
<body>
<if value="!isset($hd.session.cart) or !isset($hd.session.uid) or !isset($hd.session.username)">
	<script type="text/javascript">
		location.href="{|U:'Index/index'}"
	</script>
</if>
<!-- 头部共用 -->
<include file="__TPL__/Common/head"/>
<include file="__TPL__/Common/alertlogin"/>
<!-- 用于ajax发送的地址 -->
<script type="text/javascript">
	var add_address_url=APP+'&c=Order&ajax_add_address';//添加新地址
</script>
<script type="text/javascript" src='__CONTROL_TPL__/js/order.js'></script>
<!-- 头部结束 -->
<div id="order" class="fixed" style="width:980px;margin:50px auto">
	<div id="use_newaddress" class="newaddress_box" style="display: none; left: 255.5px; top: 182px;">
		<div class="newaddress_box_tit">
		 	添加地址
			<img src="__CONTROL_TPL__/images/newaddress_tit_close.jpg" onclick="close_address()">
			<script type="text/javascript" >
				function close_address(){
			    	$('#use_newaddress').hide();
			    	$('#maskLayer').remove();
			    }
			</script>
		</div>
		<form id="new_address_form" method="post" name="new_address_form" action="javascript:">
			<p class="newaddress_box_name">
				<span class="shouhuoren">收货人：</span>
				<span class="shouhuoren_text_box">
					<input id="consignee" class="text1" type="text" name="consignee">
				</span>
			</p>
			<p class="detailinfo">
				<span class="detailinfo_text">详细地址：</span>
				<span class="detail_input">
					<input id="address" class="text1" type="text" style="width:315px; height:46px;" name="address">
				</span>
			</p>
			<p class="post_number">
				<span class="post_number_text">邮政编码：</span>
				<span class="post_number_input">
					<input id="zipcode" class="text1" type="text" name="zipcode">
				</span>
			</p>
			<p class="phonenumber">
				<span class="shr_phonenumber">收货电话：</span>
				<span class="shr_phonenumber_box">
					<input id="phone_mob" class="text1" type="text" name="phone_cnee">
				</span>
				<span style="margin-left:10px;font-size:12px;color:#999">如果收货人不是买家本人才需填写</span>
			</p>
			<p class="phonenumber">
				<span class="shr_phonenumber">买家电话：</span>
				<span class="shr_phonenumber_box" style="width:450px;">
					<input id="phone_mob" class="text1" type="text" name="phone_buyer">
				</span>
			</p>
			<p class="save_address">
				<input id="save_address" type="checkbox" name="save_address" value="1" checked="checked" style="float:left; display:block;">
				<span style="float:left;">自动保存收货地址（选择后该地址将会保存到您的收货地址列表）</span>
			</p>
			<dl class="confirm" style="padding-bottom: 10px">
				<dt>
					<input type="submit" value=""/>
				</dt>
				<dd><a onclick="form_reset()" href="javascript:void(0);" class="color3B">重置</a></dd>
				<script type="text/javascript">
					function form_reset () {
						document.new_address_form.reset();
					}
				</script>
			</dl>
		</form>
	</div>
	<form action="{|U:'Order/go_payment'}" id="orderform" name="orderform" method="post">
		<div class="confirm_order_info_box">
			<p class="confirm_orderinfo_status">
				<img alt="订单状态" src="__CONTROL_TPL__/images/confirm_orderinfo_status.jpg">
			</p>
			<div class="confirm_address">
				<span>
					
				</span>
			</div>
			<ul id="show_address" class="other_more_address" <if value="!empty($address_data)">style="display:block"<else/>style="display:none"</if>>
				<li class="default_address">
					<span class="send_to">寄送至</span>
					<span class="other_address_radio">
						<input type="radio" checked="checked" class="xuanze" onclick="return false">
					</span>
					<span class="other_address_info">{$address}</span>
				</li>
			</ul>
			<p id="add_address" class="use_new_address">
				<if value="isset($hd.session.uid) && isset($hd.session.username)">
					<img title="添加新地址" src="__CONTROL_TPL__/images/use_new_address.jpg" onclick="popWin('use_newaddress')">
				<else/>
					<img title="添加新地址" src="__CONTROL_TPL__/images/use_new_address.jpg" onclick="popWin('alertlogin')">
				</if>
			</p>
			<div class="clear"></div>
			<h1>
				<img alt="确认订单信息" src="__CONTROL_TPL__/images/confirm_orderinfo_tit.jpg">
			</h1>
			<if value="isset($hd.session.cart.goods)">
				<div id="orderList">
					<ul class="confirm_order_content_tit">
						<li class="li_one">店铺宝贝</li>
						<li class="li_two">分类</li>
						<li class="li_three">单价</li>
						<li class="li_four">数量</li>
						<li class="li_five">优惠</li>
						<li class="li_six">小计（元）</li>
					</ul>
					<p class="confirm_order_content_catename">
						共计：
						<a target="_blank" href="" class="color3B">{$hd.session.cart.total_rows}件</a>
					</p>
					<foreach from="{$hd.session.cart.goods}" value="$value" key="$key">
						<if value='{$value.num} neq 0'>
							<div class="confirm_order_content_con ">
								<dl>
									<dt>
										<img width="75" height="75" title="{$value.name}" src="{$value.imgUrl}">
									</dt>
									<dd>
										<p>
											<a target="_blank" href="" class="color3B">{$value.name}</a>
										</p>
										<p>颜色:{$value.options.color} 尺码:{$value.options.size}</p>
									</dd>
								</dl>
								<span class="confirm_order_content_wasaimoney">{$value.cate}</span>
								<span class="confirm_order_content_danjia">
									<input name="lgoods[{$key}][lprice]" type="hidden" value="{$value.price}">
									￥{$value.price}
								</span>
								<span class="confirm_order_content_num">
									<input name="lgoods[{$key}][lnumber]" type="hidden" value="{$value.num}">
									{$value.num}
								</span>
								<span class="confirm_order_content_youhui">--</span>
								<input type="hidden" name="lgoods[{$key}][lmoney]" value="{$value.total}
								"/>
								<input type="hidden" name="lgoods[{$key}][qm_combine_bid]" value="{$value.bid}"/>
								<input type="hidden" name="lgoods[{$key}][qm_goods_gid]" value="{$value.id}"/>
								<span class="confirm_order_content_xiaoji"> ￥{$value.total}</span>
							</div>
						</if>
					</foreach>
					<div class="confirm_order_content_con " style="border-bottom:none">
						<div class="last_info">
							<div id="sure_address" class="order_last_info_in">
								<p>
								实际付款：<em>￥{$hd.session.cart.total}</em>
								<input type="hidden" name="ototal" value="{$hd.session.cart.total}"/>
								</p>
							</div>
						</div>
						<div class="submit_order">
							<ul>
								<li class="goback">
									<a href="{|U:'cart'}" class="color3B">返回购物车</a>
								</li>
								<li>
									<if value="isset($hd.session.uid) && isset($hd.session.username)">
										<div id="submitbox" <if value='isset($address)'>style="display:block"<else/>style="display:none"</if>>
											<input type="hidden" value="{$address_data.rconsignee}" name="oconsignee"/>
											<input type="hidden" value="{$address_data.raddress}" name="oaddress"/>
											<input type="hidden" value="{$address_data.rzipcode}" name="ozipcode"/>
											<input type="hidden" value="{$address_data.rphone_cnee}" name="ophone_cnee"/>
											<input type="hidden" value="{$address_data.rphone_buyer}" name="ophone_buyer"/>
											<input type="submit" value="">
										</div>
										<div id="addressbox" <if value='isset($address)'>style="display:none"<else/>style="display:block"</if>>
											<a name="alertaddress" href="javascript:" onclick="popWin('use_newaddress')"><img title="添加新地址" src="__CONTROL_TPL__/images/submit_order.jpg"></a>
										</div>
									<else/>
										<a name="login" href="javascript:" onclick="popWin('alertlogin')"><img title="登陆" src="__CONTROL_TPL__/images/submit_order.jpg"></a>
									</if>
								</li>
							</ul>
						</div>
					</div>
				</div>
			<else/>
				<div style="margin-left:20px;margin-top:35px;">
					确认订单信息,需要您登陆都才能查看.你可以<a href="{|U:'LogReg/login'}" style="text-decoration: underline;color:#06C7D3"> [立即登陆] </a>，当然您也可以先浏览其他宝贝！
				</div>
			</if>
		</div>
	</form>
</div>
<!-- 页脚共用 -->
<include file="__TPL__/Common/footer"/>
</body>
</html>